package com.mengjian.myspringai.parse;

import com.mengjian.myspringai.model.Parameter;
import lombok.Getter;
import org.springframework.http.HttpMethod;

import java.util.List;
import java.util.function.Supplier;

@Getter
public enum RestfulEndpoint {
    GET_CITE_TIME(
        "getCiteTimeMethod",
        "获取指定时区的时间",
        "http://localhost:8888",
        "/demo/test/test",
        HttpMethod.GET,
        ParameterProvider.GET_CITE_TIME_PARAMETERS
    );













    private final String name;
    private final String description;
    private final String url;
    private final String path;
    private final HttpMethod httpMethod;
    private final Supplier<List<Parameter>> parametersSupplier;

    RestfulEndpoint(String name, String description, String url, String path,
                   HttpMethod httpMethod, Supplier<List<Parameter>> parametersSupplier) {
        this.name = name;
        this.description = description;
        this.url = url;
        this.path = path;
        this.httpMethod = httpMethod;
        this.parametersSupplier = parametersSupplier;
    }

    public List<Parameter> getParameters() {
        return parametersSupplier.get();
    }
}
